package com.glodon.paas.account.security.oauth2.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.glodon.paas.account.service.UserService;
import com.glodon.paas.account.web.util.SecurityUtils;

public class TokenInfoService {

	@Autowired
	private UserService userService; 
	
	@RequestMapping(value = "/oauth2/getAccessTokens", method = RequestMethod.GET)
	public void getAccessTokens(ModelMap model) {
		model.addAttribute("oauth2Info", userService.getAuthInfo(SecurityUtils.getCurrentUser().getId()));
	}
	
}
